package com.yuyou.tas.feedback.mapper;

import com.yuyou.tas.service.api.feedback.dto.FeedbackCommentDTO;
import com.yuyou.tas.service.api.feedback.entity.FeedbackComment;
import com.yuyou.tas.service.api.feedback.vo.resp.UnReadSimpleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FeedbackCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FeedbackComment record);

    FeedbackComment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FeedbackComment record);

    List<FeedbackComment> findByFeedbackClassId(@Param(value = "feedbackClassId") Long feedbackClassId);

    List<FeedbackCommentDTO> findFeedbackComment(Long feedbackId);

    Integer getTeacherUnReadCount(@Param(value = "userId") Long userId);

    List<UnReadSimpleVo> getTeacherClassUnReadCount(@Param(value = "userId") Long userId ,
                                                    @Param(value = "list") List<Long> list);

    void setIsReadByFeedback(@Param(value = "feedbackId") Long feedbackId);
}